package com.example.test_witns;

import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.Window;

import androidx.appcompat.app.AppCompatActivity;

import com.example.test_witns.databinding.ActivityMainBinding;


public class MainActivity extends AppCompatActivity {
    private ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        Window window = this.getWindow();
        window.setStatusBarColor(Color.parseColor("#ffffff"));
        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);

        Handler handler = new Handler();

        // 延迟 1 秒后执行任务
        handler.postDelayed(new Runnable() {
            @Override
            public void run() {
                // 在这里执行下一步操作
                Intent intent_to_bottomNavigationViewActivity = new Intent(MainActivity.this, BottomNavigationViewActivity.class);
                startActivity(intent_to_bottomNavigationViewActivity);
            }
        }, 1500); // 延迟时间（单位：毫秒）
    }

}